Mapping functions are used to apply two-dimensional textures to
surfaces. Each mapping functions defines a different method of transforming
a three dimensional point of intersection to a two dimensional u - v pair
termed texturing coordinates.
Typically, the arguments to a mapping method define a center of
a projection and two non-parallel axes that define a local coordinate system.
The default mapping method is termed u - v mapping or <#962#>inverse mapping<#962#>.
Normally, there is a different inverse mapping method for each primitive type
(see chapter 5).
When inverse mapping is used, the point of intersection is passed to
the uv method for the primitive that was hit.
- <#6233#><#6233#>
- <#1870#>map<#1870#> <#1871#>uv<#1871#>
Use the uv (inverse mapping) method associated with the
object that was intersected in order to map from 3D to determine
texturing coordinates.
The inverse mapping method for each primitive is described in Chapter 5.
- <#6235#><#6235#>
- <#1874#>map<#1874#> <#1875#>planar<#1875#> [#math199##tex2html_wrap_inline6237# #math200##tex2html_wrap_inline6239# #math201##tex2html_wrap_inline6241#]
Use a planar mapping method. The 2D texture is transformed
so that its u axis is given by #math202##tex2html_wrap_inline6244# and its v
axis by vaxis. The texture is projected along the vector
defined by the cross product of the u and v axes, with
the (0,0) in texture space mapped to #math203##tex2html_wrap_inline6250#.
- <#6251#><#6251#>
- <#1881#>map<#1881#> <#1882#>cylindrical<#1882#> [#math204##tex2html_wrap_inline6253# #math205##tex2html_wrap_inline6255# #math206##tex2html_wrap_inline6257#]
Use a cylindrical mapping method. The point of intersection
is projected onto an imaginary cylinder, and the location
of the projected point is used to determine the texture coordinates.
If given, #math207##tex2html_wrap_inline6259# and
#math208##tex2html_wrap_inline6261# define the cylinder's axis, and #math209##tex2html_wrap_inline6263# defines
where u = 0 is located.
See the description of the inverse mapping method for the
cylinder in Chapter 5. By default, the point of intersection is
projected onto a cylinder that runs through the origin along the z
axis, with #math210##tex2html_wrap_inline6267# equal to the x axis.
- <#6269#><#6269#>
- <#1888#>map<#1888#> <#1889#>spherical<#1889#> [#math211##tex2html_wrap_inline6271# #math212##tex2html_wrap_inline6273# #math213##tex2html_wrap_inline6275#]
Use a spherical mapping method. The intersection point is
projected onto an imaginary sphere, and the location of the
projected point is used to determine the texturing coordinates
in a manner identical to that used in the inverse mapping method
for the sphere primitive.
If given, the center of
the projection is #math214##tex2html_wrap_inline6277#, #math215##tex2html_wrap_inline6279# defines
the sphere axis, and the point where the
non-parallel #math216##tex2html_wrap_inline6281# intersects the sphere
defines where u = 0 is located.
By default, a spherical mapping projects points towards the origin,
with #math217##tex2html_wrap_inline6284# defined to be the z axis and
#math218##tex2html_wrap_inline6287# defined to be the x axis.